<template>
	<view class="map">
		<view class="page-body">
            <view class="page-section page-section-gap">
                <map scale="18" style="width: 100%;height: 100%;" :latitude="latitude" :longitude="longitude" :markers="covers" >
                </map>
            </view>
        </view>
	</view>
</template>

<script>
	
	export default {
		data() {
			return {
				latitude:'',
				longitude:'',
				location:'',
				 covers: [{
							latitude: '',
							longitude: '',
							iconPath: '../../static/img/location.png',
						},
					
					]
			};
		},
		onLoad:function(option){
			console.log("传过来的参数-------->",JSON.parse(decodeURIComponent(option.item)));
			this.location = JSON.parse(decodeURIComponent(option.item));
			this.latitude = this.location.latitude;
			this.longitude = this.location.longitude;
			this.covers[0].latitude = this.location.latitude;
			this.covers[0].longitude = this.location.longitude;
			// var map = uni.createMapContext('map');
			// map.moveToLocation();
		},
		methods:{
			
		}
	}
</script>

<style lang="scss">
	.map{
		min-height: 100%;
		height: 100%;
	}
	.page-body{
		width: 100%;
		height: 100%;
	}
	.page-section-gap{
		height: 100%;
	}
</style>
